package logica.common;

import java.util.Vector;

public class NodoColor {
	
	private Object valor;
	private Vector<Integer> color;

	
	public NodoColor(Object aNodo, Vector aColor)
	{
		this.valor = aNodo;
		this.color = aColor;
	}

	public NodoColor(Object aNodo)
	{
		Vector<Integer> colores = new Vector();
		for (int i=0; i < 3; i++)
		{
			int nuevoColor = Math.min(((int) (Math.random()*500)), 255);
			colores.add(nuevoColor);
		}
		
		this.valor = aNodo;
		this.color = colores;
	}

	
	public Object getValor() {
		return valor;
	}


	public void setValor(Object nodo) {
		this.valor = nodo;
	}


	public Vector<Integer> getColor() {
		return color;
	}


	public void setColor(Vector color) {
		this.color = color;
	}
	
	public boolean equals(NodoColor unNodo) {
		return valor.equals(unNodo.getValor());
	}
	
	public String toString() {
		return (String) valor;
	}

	
}
